from Base.Base import Base
from selenium.webdriver.common.by import By
class Page(Base):
    def host(self):
        self.open_url('https://www.baidu.com/')
    #定位器
    srk_loc=(By.ID,'kw')
    but_loc=(By.XPATH,'//*[@id="su"]')
    #封装页面元素
    def srk(self,text):
        self.send_keys(self.srk_loc,text)
    def but(self):
        self.click(self.but_loc)
    #业务逻辑
    def baiduluoji(self):
        self.srk('北京时间')
        self.but()